perm filename GALLEY.TEX[TEX,DEK]12 blob sn#741572 filedate 1984-02-15 generic text, type C, neo UTF8
COMMENT ⊗   VALID 00004 PAGES
C REC  PAGE   DESCRIPTION
C00001 00001
C00002 00002	%\read16 to\pagenumber
C00003 00003	\tracingparagraphs=2
C00036 00004	% now we print the answers, if any
C00037 ENDMK
C⊗;
%\read16 to\pagenumber
\input manmac
\tenpoint
\pageno=800
%\pageno=\pagenumber
\def\rhead{Experimental Pages for The \TeX book}
\def\chapno{ X}
{\catcode`\%=12 \immediate\write\ans{% Answers for galley proofs:}}
\tracingparagraphs=2
\parfillskip=0pt
\ddanger You have to be careful with the use of |&| and ↑|\span| and ↑|\cr|,
↑↑{ampersand}
because these to\-kens are interrupted by \TeX's scanner even when it is
not expanding macros.

\bye
\beginchapter Appendix B. Basic\\Control\\Sequences

Let's begin this appendix with a chart that summarizes plain \TeX's
↑↑{summary of plain TeX} ↑↑|\+| ↑↑{tabbing} ↑↑{accents}
conventions.

\def\sep{\medskip\hrule width\hsize\medskip}
\medskip\smallskip
\hrule height .61803pt
\kern 1pt
\hrule
\medskip
\line{\strut Characters that are reserved for special purposes:\hfil
  |\|\hfil|{|\hfil|}|\hfil|$|\hfil|&|\hfil|#|\hfil|%|\hfil|↑|\hfil|_|\hfil|~|}
\sep
\halign to\hsize{\strut\hfil#\hfil\tabskip\z@ plus10pt&
\hfil#\hfil&\hfil#\hfil&
\hfil#\hfil\tabskip\z@skip\cr
|\rm roman,|&|{\sl slanted},|&|{\bf boldface},|&|{\it italic\/} type|\cr
roman,&{\sl slanted},&{\bf boldface},&{\it italic\/} type\cr}
\sep
\halign to\hsize{\strut\hfil#\hfil\tabskip\z@ plus10pt&
\hfil#\hfil&\hfil#\hfil&\hfil#\hfil&\hfil#\hfil&\hfil#\hfil&
\hfil#\hfil&\hfil#\hfil&\hfil#\hfil&\hfil#\hfil&\hfil#\hfil&
\hfil#\hfil&\hfil#\hfil&\hfil#\hfil&\hfil#\hfil&\hfil#\hfil&
\hfil#\hfil&\hfil#\hfil&
\hfil#\hfil\tabskip\z@skip\cr
|``|&|''|&|--|&|---|&|?||`|&|!||`|&|\$|&|\#|&|\&|&|\%|&
  |\ae|&|\AE|&|\oe|&|\OE|&|\aa|&|\AA|&|\ss|&|\o|&|\O|\cr
``&''&--&---&?`&!`&\$&\#&\&&\%&\ae&\AE&\oe&\OE&\aa&\AA&\ss&\o&\O\cr}
\sep
\halign to\hsize{\strut\hfil#\hfil\tabskip\z@ plus10pt&
\hfil#\hfil&\hfil#\hfil&\hfil#\hfil&\hfil#\hfil&\hfil#\hfil&
\hfil#\hfil&\hfil#\hfil&\hfil#\hfil&\hfil#\hfil&\hfil#\hfil&
\hfil#\hfil&\hfil#\hfil&
\hfil#\hfil\tabskip\z@skip\cr
|\`a|&|\'e|&|\↑o|&|\"u|&|\=y|&|\~n|&|\.p|&|\u\i|&
  |\v s|&|\H\j|&|\t\i u|&|\b k|&|\c c|&|\d h|\cr
\`a&\'e&\↑o&\"u&\=y&\~n&\.p&\u\i&\v s&\H\j&\t\i u&\b k&\c c&\d h\cr}
\sep
\halign to\hsize{\strut\hfil#\hfil\tabskip\z@ plus10pt&
\hfil#\hfil&\hfil#\hfil&\hfil#\hfil&\hfil#\hfil&\hfil#\hfil&
\hfil#\hfil&\hfil#\hfil&\hfil#\hfil&\hfil#\hfil&
\hfil#\hfil\tabskip\z@skip\cr
|\l|&|\L|&|\dag|&|\ddag|&|\S|&|\P|&|{\it\$|&
  |\&}|&|\copyright|&|\TeX|&|\dots|\cr
\l&\L&\dag&\ddag&\S&\P&\phantom{\tt////}\it\$&
  \it\&\phantom{\tt/}&\copyright&\TeX&\dots\cr}
\sep
\line{\strut Line break controls:\hfil
  |\break|\hfil|\nobreak|\hfil|\allowbreak|\hfil|\hbox{unbreakable}|}
\line{\strut|dis\-cre\-tion\-ary hy\-phens|\hfil|virgule\slash breakpoint|}
\sep
\settabs 2\columns
\+\strut Breakable horizontal spaces:& Unbreakable horizontal spaces:\cr
\+|\|\] \ normal interword space& |~| \ normal interword space\cr
\+|\enskip| \ this\enskip much& |\enspace     | \ this\enspace much\cr
\+|\quad  | \ this\quad much&   |\thinspace   | \ this\thinspace much\cr
\+|\qquad | \ this\qquad much&  |\negthinspace| \ this\negthinspace much\cr
\+\strut|\hskip| \<arbitrary dimen>& |\kern| \<arbitrary dimen>\cr
\sep
\smallskip
\+\strut Vertical spaces:\hfill
  |\smallskip| $\vcenter{\hrule width2em\smallskip\hrule}$\hfill&
  |\medskip| $\vcenter{\hrule width3em\medskip\hrule}$\hfill
  |\bigskip| $\vcenter{\hrule width4em\bigskip\hrule}$&\cr
\smallskip
\sep
\line{\strut Page break controls:\hfil|\eject|\hfil|\supereject|\hfil
  |\nobreak|\hfil|\goodbreak|\hfil|\filbreak|}
\+\strut Vertical spaces and good breakpoints:&
  |\smallbreak|\hfill|\medbreak|\hfill|\bigbreak|&\cr
\sep
\settabs 4 \columns
\hbox{\strut|\settabs 4 \columns|}
\hbox{|\+Here's an example&of\hfill some &tabbing:&\hrulefill&\cr|}
\+Here's an example&of\hfill some &tabbing:&\hrulefill&\cr
\+\hfill|\hrulefill |&\hrulefill&\hfill|\dotfill |&\dotfill&\cr
\+\hfill|\leftarrowfill |&\leftarrowfill&
  \hfill|\rightarrowfill |&\rightarrowfill&\cr
\+\hfill|\upbracefill |&\upbracefill&
  \hfill|\downbracefill |&\downbracefill&\cr
\smallskip
\line{\strut More general alignments use |\halign|, |\valign|, |\omit|,
  |\span|, and |\multispan|.}
\sep
\line{\strut Examples of the principal conventions for text layout
  appear on the next page.}
\sep\unskip
\kern 1pt
\hrule height .61803pt
\eject
\begingroup\parindent\z@ \obeylines \baselineskip12pt plus 1pt
|% This test file generates the output shown on the opposite page.|
|% It's a bit complex because it tries to illustrate lots of stuff.|
|% TeX ignores commentary (like this) that follows a `%' sign.|
| |
|% First the standard output style is changed slightly:|
↑|\hsize||=29pc % The lines in this book are 29 picas wide.|
↑|\vsize||=42pc % The page body is 42 picas (not counting footlines).|
↑|\footline||={\tenrm Footline\quad\dotfill\quad Page \folio}|
↑|\pageno||=1009 % This is the starting page number (don't ask why).|
|% See Chapter 23 for the way to make other page format changes via|
|% \hoffset, \voffset, \nopagenumbers, \headline, or \raggedbottom.|
| |
↑|\vglue|| 1in % This makes an inch of blank space (1in=2.54cm).|
↑|\centerline||{\bf A Bold, Centered Title}|
↑|\smallskip|| % This puts a little extra space after the title line.|
↑|\rightline||{\it avec un sous-titre \`a la fran\c caise}|
|% Now we use \beginsection to introduce part 1 of the document.|
↑|\beginsection|| 1. Plain \TeX nology % The next line must be blank!|
| |↑↑{blank line}
|The first paragraph of a new section is not indented.|
↑|\TeX||\ recognizes the end of a paragraph when it comes to a blank|
|line in your manuscript file. % or to a `\par': see below.|↑↑|\par|
| |↑↑|\footnote|↑↑|\tt|↑↑|\char|
|Subsequent paragraphs {\it are\/} indented.\footnote*{The amount|
|    of indentation can be changed by changing a parameter called|
|{\tt\char`\\parindent}. Turn the page for a summary of \TeX's most|
|important parameters.} (See?) The computer breaks a paragraph's|
|text into lines in an interesting way---see reference~[1]---and h%|
|     yphenates words automatically     when necessary.|↑↑{percent}
| |
↑|\midinsert|| % This begins inserted material, e.g., a figure.|
|\narrower\narrower % This brings the margins in (see Chapter 14).|
↑|\noindent|| |↑|\llap||{``}If there hadn't been room for this material on|
|the present page, it would have been inserted on the next one.''|
|\endinsert % This ends the insertion and the effect of \narrower.|
| |
↑|\proclaim|| Theorem T. The typesetting of $math$ is discussed in|
|Chapters 16--19, and math symbols are summarized in Appendix~F.|
| |
|\beginsection 2. Bibliography\par % `\par' acts like a blank line.|
↑|\frenchspacing|| % (Chapter 12 recommends this for bibliographies.)|
↑|\item||{[1]} D.~E. Knuth and M.~F. Plass, ``Breaking paragraphs|↑↑{Plass}
|into lines,'' {\sl Softw. pract. exp. \bf11} (1981), 1119--1184.|↑↑{Knuth}
↑|\bye|| % This is the way the file ends, not with a \bang but a \bye.|
\eject\endgroup
{\parindent 20pt
\vglue 1in % This makes an inch of blank space (1in=2.54cm).
\centerline{\bf A Bold, Centered Title}
\smallskip % This puts a little extra space between lines here.
\rightline{\it avec un sous-titre \`a la fran\c caise}
% Now we use \beginsection to introduce part 1 of the document.
\beginsection 1. Plain \TeX nology % The next line must be blank!

The first paragraph of a new section is not indented.
\TeX\ recognizes the end of a paragraph when it comes to a blank
line in your manuscript file. % or to a `\par': see below.

Subsequent paragraphs {\it are\/} indented.*{\spacefactor=3000}
(See?) The computer breaks a paragraph's
text into lines in an interesting way---see reference~[1]---and h%
     yphenates words automatically     when necessary.

\midinsert % This begins inserted material, e.g., a figure.
\narrower\narrower % This brings the margins in (see Chapter 14).
\noindent \llap{``}If there hadn't been room for this material on
the present page, it would have been inserted on the next one.''
\endinsert % This ends the insertion and the effect of \narrower.

\proclaim Theorem T. The typesetting of $math$ is discussed in
Chapters 16--19, and math symbols are summarized in Appendix~F.

\beginsection 2. Bibliography\par% `\par' is just like blank line.
\frenchspacing % (Chapter 12 recommends this for bibliographies.)
\item{[1]} D.~E. Knuth and M.~F. Plass, ``Breaking paragraphs
into lines,'' {\sl Softw. pract. exp. \bf11} (1981), 1119--1184.
\vfill
\hrule width 2in \kern 2.6pt
\textindent{*}\strut
The amount of indentation can be changed by changing a parameter called
{\tt\char`\\parindent}. Turn the page for a summary of \TeX's most
important parameters.\par
\baselineskip 24pt
\line{Footline\quad\dotfill\quad Page 1009}
\eject}

The preceding example illustrates most of the basic things
that you can do directly with plain \TeX, but it does not provide an
exhaustive list. Thus, it uses |\centerline| and |\rightline|,
but not |\leftline| or |\line|; it uses |\midinsert|, but not
|\topinsert| or |\pageinsert|; it uses |\smallskip|, but not
|\medskip| or |\bigskip|; it uses |\llap| but not |\rlap|, |\item|
but not |\itemitem|, |\vglue| but not |\hglue|. It does not
illustrate |\raggedright| setting of paragraphs; it does not use
↑|\obeylines| or ↑|\obeyspaces| to shut off \TeX's automatic
formatting. ↑↑{as is, see obeylines, obeyspaces}
All such control sequences are explained later in this appendix, and
further information can be found by looking them up in the index.
The main purpose of the example is to serve as a reminder of the
repertoire of possibilities.

Most of the control sequences used in the example are defined by
macros of plain \TeX\ format, but three of them are ↑{primitive}, i.e.,
built~in: `|\par|' (end of paragraph), `|\noindent|' (beginning of
non-indented paragraph), and `|\/|' (italic correction). The example
also assigns values to two of \TeX's primitive parameters, namely
|\hsize| and |\vsize|. \TeX\ has scores of parameters, all of which
are listed in Chapter~24, but only a few of them are of special

\vfill\eject
% now we print the answers, if any

% that blank line will stop an unfinished \answer
\immediate\closeout\ans
\vfill\eject
\ninepoint
\input answers
\bye